<!--{template ADMIN_DIRECTORY/tpl/admin_header}-->
 
<div class="page_title">
    	<h1>{$_lang['attachment_manage']}</h1>
         <div class="tool"> 
            <a href="index.php?do=tool&view=file" {if $view == 'file'}class="here"{/if} >{$_lang['attachment']}</a>
    	</div>
</div>
<div class="box search p_relative">
    	<div class="title"><h2>{$_lang['search']}</h2></div>
        <div class="detail" id="detail">
			<form action="#" method="get" id="frm_list">
        	<input type="hidden" name="do"   value="$do">
			<input type="hidden" name="view" value="$view">
			<input type="hidden" name="type" value="$type">
			<input type="hidden" name="page" value="$page">
			<table cellspacing="0" cellpadding="0">
			 <tbody>
			 	<tr>
			 		<th>{$_lang['attachment']}编号</th>
					<td><input type="text" class="txt" name="txt_file_id" value="$txt_file_id" onkeyup="clearstr(this);"></td>
					<th>{$_lang['attachment_name']}</th>
					<td><input type="text" class="txt" name='txt_file_name' value="{$txt_file_name}" onkeyup="clearspecial(this);"></td>
			 	</tr>

				<tr>
					<th>{$_lang['show_number']}</th>
					<td>
						<select name="wh[page_size]" class="ps vm">
						<option value="10" {if $wh['page_size']=='10'}selected="selected"{/if}>{$_lang['page_size']}10</option>
						<option value="20" {if $wh['page_size']=='20'}selected="selected"{/if}>{$_lang['page_size']}20</option>
						<option value="30" {if $wh['page_size']=='30'}selected="selected"{/if}>{$_lang['page_size']}30</option>
						</select>
					</td>
					<th>{$_lang['result_order']}</th>
					<td>
						
						<select name="ord[]">
                        <option value="file_id" {if $ord['0']=='file_id' or !isset($ord['0'])} selected="selected"{/if}>{$_lang['default_order_by_id']}</option>
                        <option value="file_name" {if $ord['0']=='file_name' } selected="selected"{/if}>{$_lang['attachment_name']}</option>
						<option value="on_time" {if $ord['0']=='on_time' } selected="selected"{/if}>{$_lang['upload_time']}</option>
                        </select>
                        <select name="ord[]">
                        <option {if $ord['1']=='desc' or !isset($ord['1'])}selected="selected" {/if} value="desc">{$_lang['desc']}</option>
                        <option {if $ord['1']=='asc'}selected="selected" {/if} value="asc">{$_lang['asc']}</option>
                        </select>
						<button type="submit" name="sbt_search" value={$_lang['search']} class="pill" />
						<span class="icon magnifier">&nbsp;</span>{$_lang['search']}</button>
					</td>
				</tr>
				 
			 </tbody>
			</table>
			</form>
        </div>
	 </div>


 <div class="box list">
			 
	  	  	<div class="title"><h2>{$_lang['attachment_manage']}</h2></div>
        	<div class="detail">
        		<form name="frm" id="frm" method="post" action="index.php?do=$do&view=$view">
        			<div id="ajax_dom">
        				<input type="hidden" name="page" value="{$page}">
          		<table width="100%" border="0" cellspacing="0" cellpadding="0" >
                <tr>
                	<th width="50">
                		<input type="checkbox" id="checkbox" onclick="checkall();">编号
                	</th>
                    <th class="100" >
                        {$_lang['belongs_object']}
                    </th>
                    <th class="motif" >
                        {$_lang['attachment_name']}
                    </th>
                    <th width="200">
                        {$_lang['time']} 
                    </th>
                    <th width="60">
                      {$_lang['delete']}
                    </th>
                </tr>
                {loop $file_arr $key $value}
                <tr class="item">
                	<td >
                        <input type="checkbox" name="ckb[]" class="checkbox" value="{$value['file_id']}">{$value['file_id']}
                    </td>
                   
                    <td >
                        {$file_type_arr[$value['obj_type']]}
                    </td>
                    <td >
                        <a href="../$value['save_name']" target="_blank" >{$value['file_name']}</a>
                    </td>
                    <td>
                        <!--{date('Y-m-d H:i:s',$value['on_time'])}-->
                    </td>
                    <td>
                        <a href="$url&ac=del&file_id={$value['file_id']}"
						 onclick="return cdel(this);" class="button dbl_target">
                        	<span class="trash icon"></span>{$_lang['delete']}</a>
                    </td>
                </tr>
				{/loop}
                <tr>
                    <td colspan="5" >
                        <label for="checkbox">{$_lang['select_all']}</label>
							<input type="hidden" name="sbt_action" class="sbt_action"/>　
							<button type="submit" name="sbt_del" class="negative pill button" value="{$_lang['mulit_delete']}" onclick="return batch_act(this,'frm')" >
								<span class="trash icon"></span>{$_lang['mulit_delete']}</button> 
                            </td>
                        </tr>
                        </table>
						<div class="page">
                                    {$pages['page']}
                                </div>
						</div>
				</form>
			</div>
</div>

 <!--{template ADMIN_DIRECTORY/tpl/admin_footer}-->
